namespace ext.data
{
	using System;
	using System.Runtime.CompilerServices;
	using System.Html;
	using System.Collections;
	
	
	/// <summary>
	/// Data reader class to create an Array of {@link Ext.data.Record} objects from an XML document
	/// based on mappings in a provided {@link Ext.data.Record} constructor.  Note: that in order for the browser to parse a returned XML document, the Content-Type
	/// header in the HTTP response must be set to &quot;text/xml&quot; or &quot;application/xml&quot;.  Example code:  
	/// var Employee = Ext.data.Record.create([
	/// {name: &apos;name&apos;, mapping: &apos;name&apos;}, // &quot;mapping&quot; property not needed if it is the same as &quot;name&quot;
	/// {name: &apos;occupation&apos;} // This field will use &quot;occupation&quot; as the mapping.
	/// ]);
	/// var myReader = new Ext.data.XmlReader({
	/// totalProperty: &quot;results&quot;, // The element which contains the total dataset size (optional)
	/// record: &quot;row&quot;, // The repeated element which contains row information
	/// idProperty: &quot;id&quot; // The element within the row that provides an ID for the record (optional)
	/// messageProperty: &quot;msg&quot; // The element within the response that provides a user-feedback message (optional)
	/// }, Employee);
	///  
	/// This would...
	/// </summary>
	/// <htmlSummary>
	/// &lt;p&gt;Data reader class to create an Array of {@link Ext.data.Record} objects from an XML document
	/// based on mappings in a provided {@link Ext.data.Record} constructor.&lt;/p&gt;
	/// &lt;p&gt;&lt;b&gt;Note&lt;/b&gt;: that in order for the browser to parse a returned XML document, the Content-Type
	/// header in the HTTP response must be set to &quot;text/xml&quot; or &quot;application/xml&quot;.&lt;/p&gt;
	/// &lt;p&gt;Example code:&lt;/p&gt;
	/// &lt;pre&gt;&lt;code&gt;
	/// var Employee = Ext.data.Record.create([
	/// {name: &apos;name&apos;, mapping: &apos;name&apos;}, // &quot;mapping&quot; property not needed if it is the same as &quot;name&quot;
	/// {name: &apos;occupation&apos;} // This field will use &quot;occupation&quot; as the mapping.
	/// ]);
	/// var myReader = new Ext.data.XmlReader({
	/// totalProperty: &quot;results&quot;, // The element which contains the total dataset size (optional)
	/// record: &quot;row&quot;, // The repeated element which contains row information
	/// idProperty: &quot;id&quot; // The element within the row that provides an ID for the record (optional)
	/// messageProperty: &quot;msg&quot; // The element within the response that provides a user-feedback message (optional)
	/// }, Employee);
	/// &lt;/code&gt;&lt;/pre&gt;
	/// &lt;p&gt;
	/// This would consume an XML file like this:
	/// &lt;pre&gt;&lt;code&gt;
	/// &amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
	/// &amp;lt;dataset&gt;
	/// &amp;lt;results&gt;2&amp;lt;/results&gt;
	/// &amp;lt;row&gt;
	/// &amp;lt;id&gt;1&amp;lt;/id&gt;
	/// &amp;lt;name&gt;Bill&amp;lt;/name&gt;
	/// &amp;lt;occupation&gt;Gardener&amp;lt;/occupation&gt;
	/// &amp;lt;/row&gt;
	/// &amp;lt;row&gt;
	/// &amp;lt;id&gt;2&amp;lt;/id&gt;
	/// &amp;lt;name&gt;Ben&amp;lt;/name&gt;
	/// &amp;lt;occupation&gt;Horticulturalist&amp;lt;/occupation&gt;
	/// &amp;lt;/row&gt;
	/// &amp;lt;/dataset&gt;
	/// &lt;/code&gt;&lt;/pre&gt;
	/// </htmlSummary>
	/// <definedin>src\data\XmlReader.js</definedin>
	[ScriptName("XmlReader")]
	[ScriptNamespace("Ext.data")]
	[Imported()]
	public partial class XmlReader : ext.data.DataReader
	{
		
		#region Constructors
		/// <summary>Constructor</summary>
		/// <param name="meta">Metadata configuration options</param>
		/// <param name="recordType">
		/// Either an Array of field definition objects as passed to
		/// {@link Ext.data.Record#create}, or a Record constructor object created using {@link Ext.data.Record#create}.
		/// </param>
		public XmlReader(object meta, object recordType)
		{
		}
		
		/// <summary>Constructor</summary>
		public XmlReader()
		{
		}
		#endregion
		
		#region Properties
		/// <summary>After any data loads/reads, the raw XML Document is available for further custom processing.</summary>
		/// <definedin>src\data\XmlReader.js</definedin>
		[ScriptName("xmlData")]
		[IntrinsicProperty()]
		public System.Xml.XmlDocument XmlData
		{
			get
			{
				throw new System.Exception("Imported - not implemented");
			}
			set
			{
			}
		}
		#endregion
		
		#region Methods
		/// <summary>This method is only used by a DataProxy which has retrieved data from a remote server.</summary>
		/// <definedin>src\data\XmlReader.js</definedin>
		/// <param name="response">
		/// The XHR object which contains the parsed XML document. The response is expected
		/// to contain a property called &lt;tt&gt;responseXML&lt;/tt&gt; which refers to an XML document object.
		/// </param>
		/// <returns>
		/// records A data block which is used by an {@link Ext.data.Store} as
		/// a cache of Ext.data.Records.
		/// </returns>
		[ScriptName("read")]
		public object Read(object response)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Create a data block containing Ext.data.Records from an XML document.</summary>
		/// <definedin>src\data\XmlReader.js</definedin>
		/// <param name="doc">A parsed XML document.</param>
		/// <returns>
		/// records A data block which is used by an {@link Ext.data.Store} as
		/// a cache of Ext.data.Records.
		/// </returns>
		[ScriptName("readRecords")]
		public object ReadRecords(object doc)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Decode an XML response from server.</summary>
		/// <definedin>src\data\XmlReader.js</definedin>
		/// <param name="action">[{@link Ext.data.Api#actions} create|read|update|destroy]</param>
		/// <param name="response">HTTP Response object from browser.</param>
		/// <returns>An instance of {@link Ext.data.Response}</returns>
		[ScriptName("readResponse")]
		public ext.data.Response ReadResponse(string action, object response)
		{
			throw new System.Exception("Imported - not implemented");
		}
		#endregion
	}
}
